package com.logos.ruralrevitalization.service;

import com.logos.ruralrevitalization.entity.AttractionReviews;
import com.logos.ruralrevitalization.req.AttractionReviewsReq;
import com.logos.ruralrevitalization.resp.AttractionReviewsResp;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * 景点评论表(AttractionReviews)表服务接口
 *
 * @author rose
 * @since 2025-03-25 21:58:34
 */
public interface AttractionReviewsService {

    /**
     * 通过ID查询单条数据
     *
     * @param id 主键
     * @return 实例对象
     */
    AttractionReviews queryById(Integer id);

    /**
     * 分页查询
     *
     * @param attractionReviews 筛选条件
     * @param pageRequest      分页对象
     * @return 查询结果
     */
    Page<AttractionReviews> queryByPage(AttractionReviews attractionReviews, PageRequest pageRequest);

    /**
     * 发表评论
     */
    Boolean insert(AttractionReviewsReq attractionReviewsReq);

    /**
     * 修改数据
     *
     */
    AttractionReviews update(AttractionReviews attractionReviews);

    /**
     * 通过主键删除数据
     *
     * @param id 主键
     * @return 是否成功
     */
    boolean deleteById(Integer id);

    List<AttractionReviewsResp> queryByAttractionId(Integer attractionId);

    Boolean updateById(AttractionReviewsReq attractionReviewsReq);
}
